package dev.polls.skycube;

import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Intent;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

public class Image extends Activity {
	Bitmap bitmap;
	public String Text = null;
	UploadFtp ga = new UploadFtp();
	private String filepath = null;
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.fill);	
		
		Intent sender= getIntent();
		filepath = sender.getStringExtra("pathId");
		System.out.println(filepath);
		final Button submit = (Button) findViewById(R.id.Sub);
		submit.setOnClickListener(new View.OnClickListener() {
			
        	public void onClick(View view) {
        		
        		EditText input =(EditText)findViewById(R.id.Edit);
        		ProgressDialog dialog = ProgressDialog.show(Image.this,"","Uploading, Please wait...", true);
        			Text = input.getText().toString();
        			ga.ftpUpload(filepath,Text + ".jpg");
        			System.out.println(filepath);
        			finish();
        			}


        });}
	
}
